<?php 
	include 'init.php';
	
	$sql = 'select id,name from category where pid=0 and display = 1'; 
	$cate_list = query($sql);
	// var_dump($cate_list);

?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>

	<link rel="stylesheet" href="<?= PUB_CSS?>commond.css">

	<link rel="stylesheet" href="<?= CSS?>nva.css">
</head>

<body>
	<div class='nav clear'>
		<div class='shortcut clear'>
			<div class='layout clear'>
			<ul class='top clear'>
				<li class ='gw '>华为官网</li>
				<li class ='ry'>华为荣耀</li>
				<li class ='yy'><div class='rj'>软件应用</div></li>
				<li class ='job'>花粉俱乐部</li>
				<li><div>网站导航</div></li>
				<li>手机版</li>	
				<li>v码(优码购)</li>
				<li><a href="<?= URL?>home/user/orders.php">我的订单</a></li>
				<li>
					<div>
					<?php if($_SESSION['home']): ?>
					<a class="login" href="<?= URL?>home/user/receive.php"><?= empty($_SESSION['home']['nickname'])? $_SESSION['home']['tel']:$_SESSION['home']['nickname']    ?></a>
					<a class="reg2" href="<?= URL?>home/login/action.php?bz=logout">退出</a>
						<?php else: ?>		
					<a href="<?= URL?>home/login/login.php">登录</a>
					<span class="line">|</span>

					<a href="<?= URL?>home/login/reg.php">注册</a>
					<?php endif; ?>
					</div>
				</li>
				
			</ul>
		</div>
	</div>

	 <div class='header'>
	 	<div class='h-layout clear'>
	 		<div class='logo'><img src="/lamp_shop/public/home/images/newLogo.png" alt=""></div>
	 		<div class='searchBar'>
	 			<div class='searchBar-eara'>
		 			<form action="<?= URL?>404.php">
		 				<div class='srarchBar-form'><input class='text' type="text" name='case'>
		 				<input class='botton'type="submit" value='搜索'></div>
		 			</form>
		 			<div class='searchBar-key '>
		 				<b>热门搜索:</b>
		 				<a href="<?= URL?>404.php">荣耀7</a>
		 				<a href="<?= URL?>404.php">5X</a>
		 				<a href="<?= URL?>404.php">4A</a>
		 				<a href="<?= URL?>404.php">P8</a>
		 				<a href="<?= URL?>404.php">4C</a>
		 				<a href="<?= URL?>404.php">热门配件</a>
		 			</div>
	 			</div>	 	
	 		</div>

	 			<div class='sc'><a href="<?= URL?>404.php">我的商城</a></div>
	 			<div class='gwc'><a href="<?= URL?>home/goods/shopcart.php?id=<?= $v['id']?>">我的购物车</a></div>	
	 			<div  class='header-qrcode'>
	 				<p><img class='qrcode' src="/lamp_shop/public/home/images/qrcode_vmall_app01.png"></p>
	 				<span class='sm'><a href="<?= URL?>404.php">扫码下载客户端</a></span>
	 			</div>
	 		</div>
	 		<div class='nvamain'>
			<div class='nvamain2'>
				<div class='main-h'>全部商品</div>
					<div class='main-nva-list clear'>
						<ul>
							<li><a class='main-sy' href="<?= URL?>home/index.php">首页</a></li>
					<?php foreach($cate_list as $v): ?>
						<li><a href='<?= URL?>home/goods/index.php?cid=<?= $v['id']?>'><?= $v['name']?></a></li>
					<?php endforeach; ?>
				
						</ul>
					</div>
			</div>
			</div>
	 	</div>
	
	</div>
	<!-- <div class='hr-10'></div> -->